<?php

/**
 * Citologia filter form base class.
 *
 * @package    citologia
 * @subpackage filter
 * @author     Your name here
 * @version    SVN: $Id: sfDoctrineFormFilterGeneratedTemplate.php 29570 2010-05-21 14:49:47Z Kris.Wallsmith $
 */
abstract class BaseCitologiaFormFilter extends BaseFormFilterDoctrine
{
  public function setup()
  {
    $this->setWidgets(array(
      'pacientes_id'        => new sfWidgetFormDoctrineChoice(array('model' => $this->getRelatedModelName('Pacientes'), 'add_empty' => true)),
      'usuarios_id'         => new sfWidgetFormDoctrineChoice(array('model' => $this->getRelatedModelName('Usuarios'), 'add_empty' => true)),
      'examenclinico_id'    => new sfWidgetFormDoctrineChoice(array('model' => $this->getRelatedModelName('Examen_Clinico'), 'add_empty' => true)),
      'descripcionhallazgo' => new sfWidgetFormFilterInput(),
      'fur'                 => new sfWidgetFormFilterDate(array('from_date' => new sfWidgetFormDate(), 'to_date' => new sfWidgetFormDate())),
      'g'                   => new sfWidgetFormFilterInput(array('with_empty' => false)),
      'p'                   => new sfWidgetFormFilterInput(array('with_empty' => false)),
      'c'                   => new sfWidgetFormFilterInput(array('with_empty' => false)),
      'a'                   => new sfWidgetFormFilterInput(array('with_empty' => false)),
      'planifica'           => new sfWidgetFormFilterInput(array('with_empty' => false)),
      'planificametodo'     => new sfWidgetFormFilterInput(),
      'radioterapia'        => new sfWidgetFormFilterInput(array('with_empty' => false)),
      'radioterapiadate'    => new sfWidgetFormFilterDate(array('from_date' => new sfWidgetFormDate(), 'to_date' => new sfWidgetFormDate())),
      'conizacion'          => new sfWidgetFormFilterInput(array('with_empty' => false)),
      'conizaciondate'      => new sfWidgetFormFilterDate(array('from_date' => new sfWidgetFormDate(), 'to_date' => new sfWidgetFormDate())),
      'histerectomia'       => new sfWidgetFormFilterInput(array('with_empty' => false)),
      'histerectomiadate'   => new sfWidgetFormFilterDate(array('from_date' => new sfWidgetFormDate(), 'to_date' => new sfWidgetFormDate())),
      'created_at'          => new sfWidgetFormFilterDate(array('from_date' => new sfWidgetFormDate(), 'to_date' => new sfWidgetFormDate(), 'with_empty' => false)),
      'updated_at'          => new sfWidgetFormFilterDate(array('from_date' => new sfWidgetFormDate(), 'to_date' => new sfWidgetFormDate(), 'with_empty' => false)),
    ));

    $this->setValidators(array(
      'pacientes_id'        => new sfValidatorDoctrineChoice(array('required' => false, 'model' => $this->getRelatedModelName('Pacientes'), 'column' => 'id')),
      'usuarios_id'         => new sfValidatorDoctrineChoice(array('required' => false, 'model' => $this->getRelatedModelName('Usuarios'), 'column' => 'id')),
      'examenclinico_id'    => new sfValidatorDoctrineChoice(array('required' => false, 'model' => $this->getRelatedModelName('Examen_Clinico'), 'column' => 'id')),
      'descripcionhallazgo' => new sfValidatorPass(array('required' => false)),
      'fur'                 => new sfValidatorDateRange(array('required' => false, 'from_date' => new sfValidatorDate(array('required' => false)), 'to_date' => new sfValidatorDateTime(array('required' => false)))),
      'g'                   => new sfValidatorSchemaFilter('text', new sfValidatorInteger(array('required' => false))),
      'p'                   => new sfValidatorSchemaFilter('text', new sfValidatorInteger(array('required' => false))),
      'c'                   => new sfValidatorSchemaFilter('text', new sfValidatorInteger(array('required' => false))),
      'a'                   => new sfValidatorSchemaFilter('text', new sfValidatorInteger(array('required' => false))),
      'planifica'           => new sfValidatorSchemaFilter('text', new sfValidatorInteger(array('required' => false))),
      'planificametodo'     => new sfValidatorPass(array('required' => false)),
      'radioterapia'        => new sfValidatorSchemaFilter('text', new sfValidatorInteger(array('required' => false))),
      'radioterapiadate'    => new sfValidatorDateRange(array('required' => false, 'from_date' => new sfValidatorDate(array('required' => false)), 'to_date' => new sfValidatorDateTime(array('required' => false)))),
      'conizacion'          => new sfValidatorSchemaFilter('text', new sfValidatorInteger(array('required' => false))),
      'conizaciondate'      => new sfValidatorDateRange(array('required' => false, 'from_date' => new sfValidatorDate(array('required' => false)), 'to_date' => new sfValidatorDateTime(array('required' => false)))),
      'histerectomia'       => new sfValidatorSchemaFilter('text', new sfValidatorInteger(array('required' => false))),
      'histerectomiadate'   => new sfValidatorDateRange(array('required' => false, 'from_date' => new sfValidatorDate(array('required' => false)), 'to_date' => new sfValidatorDateTime(array('required' => false)))),
      'created_at'          => new sfValidatorDateRange(array('required' => false, 'from_date' => new sfValidatorDateTime(array('required' => false, 'datetime_output' => 'Y-m-d 00:00:00')), 'to_date' => new sfValidatorDateTime(array('required' => false, 'datetime_output' => 'Y-m-d 23:59:59')))),
      'updated_at'          => new sfValidatorDateRange(array('required' => false, 'from_date' => new sfValidatorDateTime(array('required' => false, 'datetime_output' => 'Y-m-d 00:00:00')), 'to_date' => new sfValidatorDateTime(array('required' => false, 'datetime_output' => 'Y-m-d 23:59:59')))),
    ));

    $this->widgetSchema->setNameFormat('citologia_filters[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    $this->setupInheritance();

    parent::setup();
  }

  public function getModelName()
  {
    return 'Citologia';
  }

  public function getFields()
  {
    return array(
      'id'                  => 'Number',
      'pacientes_id'        => 'ForeignKey',
      'usuarios_id'         => 'ForeignKey',
      'examenclinico_id'    => 'ForeignKey',
      'descripcionhallazgo' => 'Text',
      'fur'                 => 'Date',
      'g'                   => 'Number',
      'p'                   => 'Number',
      'c'                   => 'Number',
      'a'                   => 'Number',
      'planifica'           => 'Number',
      'planificametodo'     => 'Text',
      'radioterapia'        => 'Number',
      'radioterapiadate'    => 'Date',
      'conizacion'          => 'Number',
      'conizaciondate'      => 'Date',
      'histerectomia'       => 'Number',
      'histerectomiadate'   => 'Date',
      'created_at'          => 'Date',
      'updated_at'          => 'Date',
    );
  }
}
